<template>
	<view class="page-list">
		<mescroll-body ref="mescrollRef" safearea @init="mescrollInit" :down="downOption" @down="downCallback"
			@up="upCallback" bottom="30">
			<view class="list-content">
				<view class="item-message" v-for="(item, key) in messageList" :key="key">
					<view class="item-time">{{item.createTime}}</view>

				</view>
			</view>
		</mescroll-body>
	</view>
</template>

<script>
	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
	import config from '@/common/js/config.js'
	import helper from '@/common/js/helper.js'
	import wPicker from '@/components/w-picker/w-picker.vue'
	export default {
		mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
		data() {
			return {
				messageList: []
			}
		},
		onShow() {

		},
		methods: {
			upCallback(page) {
				let httpData = {
					pageNum: page.num,
					pageSize: page.size
				}
				helper.ajax({
					url: '/api/System/BillRule/BillNumber/OrderNumber',
					type: 'get',
					data: httpData,
					success: res => {
						this.order.orderCode = res.data.data;
						let curPageLen = res.list.length;
						let totalSize = res.total;
						this.mescroll.endBySize(curPageLen, totalSize);
						if (page.num == 1) {
							this.messageList = []
						}
						this.messageList = this.messageList.concat(res.list);
					}
				});
			},
			onMessageDetail(detail) {


			},


		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
		},
	};
</script>

<style lang="scss" scoped>

</style>